<ui:composition
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:c="http://java.sun.com/jstl/core">

  <c:if test="#{widget.mode == 'editPassword'}">
    <h:inputSecret id="#{widget.id}_firstPassword" styleClass="#{widgetProperty_styleClass}"
      required="#{widgetProperty_required}" value="#{field_0}">
    </h:inputSecret>
    <h:outputLabel for="#{widget.id}_firstPassword" value="#{messages['password']}" />
    <h:message for="#{widget.id}_firstPassword" styleClass="errorMessage" />

    <h:inputSecret id="#{widget.id}_secondPassword" styleClass="#{widgetProperty_styleClass}"
      required="#{widgetProperty_required}">
    </h:inputSecret>
    <h:outputLabel for="#{widget.id}_secondPassword" value="#{messages['password.verify']}" />
    <h:message for="#{widget.id}_secondPassword" styleClass="errorMessage" />

    <h:inputHidden value="needed" validator="#{userManagementActions.validatePassword}" id="#{widget.id}">
      <f:attribute name="firstPasswordInputId" value="#{widget.id}_firstPassword" />
      <f:attribute name="secondPasswordInputId" value="#{widget.id}_secondPassword" />
    </h:inputHidden>
    <h:message for="#{widget.id}" styleClass="errorMessage" />
  </c:if>

</ui:composition>